#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int main()
{
	double x, sum;
	int n;
	cin >> x >> n;
	if(x -1)
	{
		sum = (pow(x, n + 1) - 1) / (x - 1);
	}
	printf("%.2lf\n", sum);
	return 0;
}
